-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using a bot account. #83
Conversation
@@ -776,16 +658,16 @@ func (p *Plugin) handleCommentMentionNotification(event *github.IssueCommentEven | |||
continue | |||
} | |||
|
|||
userID := p.getGitHubToUserIDMapping(username) | |||
if userID == "" { | |||
userId := p.getGitHubToUserIDMapping(username) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think go vet
was glitching out.
Would you also please set |
@hanzei Ready for re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One comment below re: non-configurability of username.
@@ -81,13 +85,31 @@ func (p *Plugin) OnActivate() error { | |||
return err | |||
} | |||
p.API.RegisterCommand(getCommand()) | |||
user, err := p.API.GetUserByUsername(config.Username) | |||
|
|||
botId, appErr := p.Helpers.EnsureBot(&model.Bot{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late catch: This is potential dangerous. EnsureBot
returns an error
, not *model.AppErr
. Because of this the checks later can fail. @crspeller Would you please fix this?
No description provided.